﻿using System.Data;
using LibDBConnect;
namespace LibDataLayer
{
    public static class DalCount
    {
        private static readonly SqlHelper Cls = new SqlHelper();
        #region[Get-Data]
        public static DataTable GetCountTopics(int Fid)
        {
            Cls.CreateNewSqlCommand();
            Cls.AddParameter("Fid", Fid);
            return Cls.GetData("sp_Topics_Get_Count");
        }
        public static DataTable GetCountPostsDate(int Fid)
        {
            Cls.CreateNewSqlCommand();
            Cls.AddParameter("Fid", Fid);
            return Cls.GetData("sp_Topics_Get_CountPostsDate");
        }
        public static DataTable GetCountPostsDateAll()
        {
            Cls.CreateNewSqlCommand();
            return Cls.GetData("sp_Topics_Get_CountPostsDate_All");
        }
        public static DataTable GetCountNumViewsAll()
        {
            Cls.CreateNewSqlCommand();
            return Cls.GetData("sp_Topics_Get_CountNumViews_All");
        }
        public static DataTable GetCountNumUserNewAll()
        {
            Cls.CreateNewSqlCommand();
            return Cls.GetData("sp_Topics_Get_CountNumUserNew");
        }
        public static DataTable GetCountNumUserNewSumPosts(string UserId)
        {
            Cls.CreateNewSqlCommand();
            Cls.AddParameter("UserId", UserId);
            return Cls.GetData("sp_Topics_Get_CountNumUserNewSumPosts");
        }
        public static DataTable GetCountNumUserHotSumPosts(string UserId)
        {
            Cls.CreateNewSqlCommand();
            Cls.AddParameter("UserId", UserId);
            return Cls.GetData("sp_Topics_Get_CountNumUserHotSumPosts");
        }
        public static DataTable GetTopicsGetCountNumViewsShowAll()
        {
            Cls.CreateNewSqlCommand();
            return Cls.GetData("sp_Topics_Get_CountNumViews_ShowAll");
        }
        public static DataTable GetSumPostsShowAll()
        {
            Cls.CreateNewSqlCommand();
            return Cls.GetData("sp_Topics_Get_SumPosts");
        }
        public static DataTable GetNewPostsShowAll()
        {
            Cls.CreateNewSqlCommand();
            return Cls.GetData("sp_Topics_Get_NewPosts");
        }
        public static DataTable GetBirthdayShowAll()
        {
            Cls.CreateNewSqlCommand();
            return Cls.GetData("sp_User_GetBirthday");
        }
        public static DataTable GetViewToppic(int Tid)
        {
            Cls.CreateNewSqlCommand();
            Cls.AddParameter("Tid", Tid);
            return Cls.GetData("sp_Topics_Get_CountNumViews");
        }
        public static DataTable GetViewToppicMini(int Tmid)
        {
            Cls.CreateNewSqlCommand();
            Cls.AddParameter("Tmid", Tmid);
            return Cls.GetData("sp_TopicsMini_Get_CountNumViews");
        }
        public static DataTable GetViewToppicForumMini(int Fmid)
        {
            Cls.CreateNewSqlCommand();
            Cls.AddParameter("Fmid", Fmid);
            return Cls.GetData("sp_ForumMini_Get_CountNumViews");
        }
        public static DataTable GetCountPostsoppic(int Tid)
        {
            Cls.CreateNewSqlCommand();
            Cls.AddParameter("Tid", Tid);
            return Cls.GetData("sp_Topics_Get_CountPosts");
        }
        public static DataTable GetCountPostsoppicMini(int Tmid)
        {
            Cls.CreateNewSqlCommand();
            Cls.AddParameter("Tmid", Tmid);
            return Cls.GetData("sp_TopicsMini_Get_CountPosts");
        }
        public static DataTable GetCountPostsoForumMini(int Fmid)
        {
            Cls.CreateNewSqlCommand();
            Cls.AddParameter("Fmid", Fmid);
            return Cls.GetData("sp_ForumMini_Get_CountPosts");
        }
        public static DataTable GetCountTopicsShowAll()
        {
            Cls.CreateNewSqlCommand();
            return Cls.GetData("sp_Topics_Get_CountTopShowAll");
        }
        public static DataTable GetCountTopicsViewShowAll()
        {
            Cls.CreateNewSqlCommand();
            return Cls.GetData("sp_Topics_Get_CountViewShowAll");
        }
        public static DataTable GetCountUserShowAll(string UserId)
        {
            Cls.CreateNewSqlCommand();
            Cls.AddParameter("UserId", UserId);
            return Cls.GetData("sp_Uuser_Get_CountTopShowAll");
        }
        #endregion
    }
}